const express = require('express');
const { uploadSingle, uploadMultiple, handleSingleUpload, handleMultipleUpload, deleteFile } = require('../middleware/upload');

const router = express.Router();

// 单文件上传接口
router.post('/single', uploadSingle('image'), handleSingleUpload);

// 多文件上传接口
router.post('/multiple', uploadMultiple('images', 5), handleMultipleUpload);

// 删除文件接口
router.delete('/delete/:filename', deleteFile);

module.exports = router;
